package vip.xiaonuo.biz.core.context.sys;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import vip.xiaonuo.sys.api.WechatApi;
import vip.xiaonuo.sys.api.dto.WechatLoginCallbackDto;
import vip.xiaonuo.sys.feign.WechatFeign;

/**
 * @author zjt
 * @description
 * @date 2025/7/21 09:41
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class WechatApiContextBean implements WechatApi {

    private final WechatFeign wechatFeign;

    /**
     * 获取企业微信用户ID
     *
     * @param loginCode
     * @return
     */
    @Override
    public WechatLoginCallbackDto getWechatCallbackByLoginCode(String loginCode) {
        return null;
    }

    /**
     * 根据Code保存敏感数据
     *
     * @param userTicket
     * @param userId
     */
    @Override
    public void saveSensitiveData(String userTicket, String userId) {

    }

    /**
     * 发送应用文字通知
     *
     * @param toUserId
     * @param content
     */
    @Override
    public void sendAppTextNotice(String toUserId, String content) {
        wechatFeign.sendAppTextNotice(toUserId, content);
    }
}
